import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listBook(query) {
  return request({
    url: '/hotel/book/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getBook(bookId) {
  return request({
    url: '/hotel/book/' + bookId,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addBook(data) {
  return request({
    url: '/hotel/book',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateBook(data) {
  return request({
    url: '/hotel/book',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delBook(bookId) {
  return request({
    url: '/hotel/book/' + bookId,
    method: 'delete'
  })
}

export function getRoomType(){
  return request({
    url: '/hotel/book/getRoomType',
    method: 'get',
  })
}


// 新增【请填写功能名称】
export function submitBook(data) {
  return request({
    url: '/hotel/book/submitBook',
    method: 'post',
    data: data
  })
}

export function getMyBook(){
  return request({
    url: '/hotel/book/getMyBook',
    method: 'get',
  })
}

export function cancelMyBook(){
  return request({
    url: '/hotel/book/cancelMyBook'
  })
}

export function doCheckin(data) {
  return request({
    url: '/hotel/checkin/doCheckin',
    method: 'put',
    data:data
  })
}

export function doExtension(data) {
  return request({
    url: '/hotel/checkin/doExtension',
    method: 'put',
    data:data
  })
}


export function cancelBook(data) {
  return request({
    url: '/hotel/checkin/cancelBook',
    method: 'put',
    data:data
  })
}


